/* all these classes are also implicitly used in imaged.html */

/* collapse fallback: no collapse (white-space preserve) is gives pretty awkward behaviour in custom htmls, so we fallback it to collapse ones */
.html-or-text-wrap,
.html-or-text-wrap-collapse /* optimization fallback */
{
    white-space: pre-wrap;
    hyphens: auto;
    overflow-wrap: normal; /* it seems that user agent sometimes by default sets it to break-word, word-break in html-or-text-wrap-wordbreak will change it if needed (actually it will be ignored) */
}

.html-or-text {
    white-space: pre;
}

/* optimization fallback: html-or-text-no-multi-line - optimization to prevent collapsing spaces and tabs in not multi-lines */
/* so if we have html-or-text-no-multi-line we just fallback to the class without collapse */
.html-or-text-wrap-collapse:not(.html-or-text-no-multi-line),
.html-or-text-wrap-collapse.html-or-text-is-html, /* optimization collapse fallback */
.html-or-text-wrap.html-or-text-is-html /* collapse fallback */
{
    white-space: normal;
}

.html-or-text-collapse {
    white-space: nowrap;
}

.html-or-text-wrap-wordbreak {
    word-break: break-word;
}

.html-or-text-ellipsis {
    text-overflow: ellipsis;
}

.is-chrome .html-or-text-wrap-fixed,
.is-chrome .html-or-text-wrap-fixed.wrap-text-not-empty.wrap-img-horz {
    display: -webkit-box;
    -webkit-line-clamp: var(--fixed-lines);
    -webkit-box-orient: vertical;
}

:not(.is-chrome) .html-or-text-wrap-fixed {
    max-height: var(--fixed-lines) !important;
}